import Vue from 'vue'
import Router from 'vue-router'
import Main from "../components/Main";
import Login from "../components/Login";
import Hall  from '../components/Address'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name:'Login',
      component:() => import('../components/Login')
    },
    {
      path: '/main',
      name: 'Main',
      component: () => import("../components/Main"),
      children: [
          {
        path: 'address',
        name: 'Address',
        component: () => import("../components/Address")
      }
        ,{
          path: 'record',
          name: 'Record',
          component: () => import("../components/Record")
        },
          {
              path: 'region',
              name: 'Region',
              component: () => import("../components/Region")
          },{
              path: 'school',
              name: 'School',
              component: () => import("../components/School")
          },
          {
              path: 'order',
              name: 'Order',
              component: () => import("../components/Order")
          },
        {
          path: 'role',
          name: 'Role',
          component: () => import("../components/Role")
        },
        {
          path: 'user',
          name: 'User',
          component: () => import("../components/User")
        },
          {
              path: 'purchase',
              name: 'Purchase',
              component: () => import("../components/Purchase")
              }
          ,
          {
              path: 'sales',
              name: 'Sales',
              component: () => import("../components/Sales")
          }
      ]
    }
  ]
})
